<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="apigee_v1.html">Apigee API</a> . <a href="apigee_v1.organizations.html">organizations</a> . <a href="apigee_v1.organizations.hostQueries.html">hostQueries</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Submit a query at host level to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of "enqueued" means that the request succeeded.</p>
<p class="toc_element">
  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Get status of a query submitted at host level. If the query is still in progress, the `state` is set to "running" After the query has completed successfully, `state` is set to "completed"</p>
<p class="toc_element">
  <code><a href="#getResult">getResult(name, x__xgafv=None)</a></code></p>
<p class="firstline">After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`</p>
<p class="toc_element">
  <code><a href="#getResultView">getResultView(name, x__xgafv=None)</a></code></p>
<p class="firstline"></p>
<p class="toc_element">
  <code><a href="#list">list(parent, dataset=None, envgroupHostname=None, from=None, inclQueriesWithoutReport=None, status=None, submittedBy=None, to=None, x__xgafv=None)</a></code></p>
<p class="firstline">Return a list of Asynchronous Queries at host level.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
  <pre>Submit a query at host level to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of &quot;enqueued&quot; means that the request succeeded.

Args:
  parent: string, Required. The parent resource name. Must be of the form `organizations/{org}`. (required)
  body: object, The request body.
    The object takes the form of:

{
  &quot;csvDelimiter&quot;: &quot;A String&quot;, # Delimiter used in the CSV file, if `outputFormat` is set to `csv`. Defaults to the `,` (comma) character. Supported delimiter characters include comma (`,`), pipe (`|`), and tab (`\t`).
  &quot;dimensions&quot;: [ # A list of dimensions. https://docs.apigee.com/api-platform/analytics/analytics-reference#dimensions
    &quot;A String&quot;,
  ],
  &quot;envgroupHostname&quot;: &quot;A String&quot;, # Hostname needs to be specified if query intends to run at host level. This field is only allowed when query is submitted by CreateHostAsyncQuery where analytics data will be grouped by organization and hostname.
  &quot;filter&quot;: &quot;A String&quot;, # Boolean expression that can be used to filter data. Filter expressions can be combined using AND/OR terms and should be fully parenthesized to avoid ambiguity. See Analytics metrics, dimensions, and filters reference https://docs.apigee.com/api-platform/analytics/analytics-reference for more information on the fields available to filter on. For more information on the tokens that you use to build filter expressions, see Filter expression syntax. https://docs.apigee.com/api-platform/analytics/asynch-reports-api#filter-expression-syntax
  &quot;groupByTimeUnit&quot;: &quot;A String&quot;, # Time unit used to group the result set. Valid values include: second, minute, hour, day, week, or month. If a query includes groupByTimeUnit, then the result is an aggregation based on the specified time unit and the resultant timestamp does not include milliseconds precision. If a query omits groupByTimeUnit, then the resultant timestamp includes milliseconds precision.
  &quot;limit&quot;: 42, # Maximum number of rows that can be returned in the result.
  &quot;metrics&quot;: [ # A list of Metrics.
    { # More info about Metric: https://docs.apigee.com/api-platform/analytics/analytics-reference#metrics
      &quot;alias&quot;: &quot;A String&quot;, # Alias for the metric. Alias will be used to replace metric name in query results.
      &quot;function&quot;: &quot;A String&quot;, # Aggregation function: avg, min, max, or sum.
      &quot;name&quot;: &quot;A String&quot;, # Required. Metric name.
      &quot;operator&quot;: &quot;A String&quot;, # One of `+`, `-`, `/`, `%`, `*`.
      &quot;value&quot;: &quot;A String&quot;, # Operand value should be provided when operator is set.
    },
  ],
  &quot;name&quot;: &quot;A String&quot;, # Asynchronous Query Name.
  &quot;outputFormat&quot;: &quot;A String&quot;, # Valid values include: `csv` or `json`. Defaults to `json`. Note: Configure the delimiter for CSV output using the csvDelimiter property.
  &quot;reportDefinitionId&quot;: &quot;A String&quot;, # Asynchronous Report ID.
  &quot;timeRange&quot;: &quot;&quot;, # Required. Time range for the query. Can use the following predefined strings to specify the time range: `last60minutes` `last24hours` `last7days` Or, specify the timeRange as a structure describing start and end timestamps in the ISO format: yyyy-mm-ddThh:mm:ssZ. Example: &quot;timeRange&quot;: { &quot;start&quot;: &quot;2018-07-29T00:13:00Z&quot;, &quot;end&quot;: &quot;2018-08-01T00:18:00Z&quot; }
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
  &quot;created&quot;: &quot;A String&quot;, # Creation time of the query.
  &quot;envgroupHostname&quot;: &quot;A String&quot;, # Hostname is available only when query is executed at host level.
  &quot;error&quot;: &quot;A String&quot;, # Error is set when query fails.
  &quot;executionTime&quot;: &quot;A String&quot;, # ExecutionTime is available only after the query is completed.
  &quot;name&quot;: &quot;A String&quot;, # Asynchronous Query Name.
  &quot;queryParams&quot;: { # Contains information like metrics, dimenstions etc of the AsyncQuery.
    &quot;dimensions&quot;: [ # Dimensions of the AsyncQuery.
      &quot;A String&quot;,
    ],
    &quot;endTimestamp&quot;: &quot;A String&quot;, # End timestamp of the query range.
    &quot;metrics&quot;: [ # Metrics of the AsyncQuery. Example: [&quot;name:message_count,func:sum,alias:sum_message_count&quot;]
      &quot;A String&quot;,
    ],
    &quot;outputFormat&quot;: &quot;A String&quot;, # Output format.
    &quot;startTimestamp&quot;: &quot;A String&quot;, # Start timestamp of the query range.
    &quot;timeUnit&quot;: &quot;A String&quot;, # Query GroupBy time unit.
  },
  &quot;reportDefinitionId&quot;: &quot;A String&quot;, # Asynchronous Report ID.
  &quot;result&quot;: { # Result is available only after the query is completed.
    &quot;expires&quot;: &quot;A String&quot;, # Query result will be unaccessable after this time.
    &quot;self&quot;: &quot;A String&quot;, # Self link of the query results. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result`
  },
  &quot;resultFileSize&quot;: &quot;A String&quot;, # ResultFileSize is available only after the query is completed.
  &quot;resultRows&quot;: &quot;A String&quot;, # ResultRows is available only after the query is completed.
  &quot;self&quot;: &quot;A String&quot;, # Self link of the query. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd`
  &quot;state&quot;: &quot;A String&quot;, # Query state could be &quot;enqueued&quot;, &quot;running&quot;, &quot;completed&quot;, &quot;failed&quot;.
  &quot;updated&quot;: &quot;A String&quot;, # Last updated timestamp for the query.
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, x__xgafv=None)</code>
  <pre>Get status of a query submitted at host level. If the query is still in progress, the `state` is set to &quot;running&quot; After the query has completed successfully, `state` is set to &quot;completed&quot;

Args:
  name: string, Required. Name of the asynchronous query to get. Must be of the form `organizations/{org}/queries/{queryId}`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
  &quot;created&quot;: &quot;A String&quot;, # Creation time of the query.
  &quot;envgroupHostname&quot;: &quot;A String&quot;, # Hostname is available only when query is executed at host level.
  &quot;error&quot;: &quot;A String&quot;, # Error is set when query fails.
  &quot;executionTime&quot;: &quot;A String&quot;, # ExecutionTime is available only after the query is completed.
  &quot;name&quot;: &quot;A String&quot;, # Asynchronous Query Name.
  &quot;queryParams&quot;: { # Contains information like metrics, dimenstions etc of the AsyncQuery.
    &quot;dimensions&quot;: [ # Dimensions of the AsyncQuery.
      &quot;A String&quot;,
    ],
    &quot;endTimestamp&quot;: &quot;A String&quot;, # End timestamp of the query range.
    &quot;metrics&quot;: [ # Metrics of the AsyncQuery. Example: [&quot;name:message_count,func:sum,alias:sum_message_count&quot;]
      &quot;A String&quot;,
    ],
    &quot;outputFormat&quot;: &quot;A String&quot;, # Output format.
    &quot;startTimestamp&quot;: &quot;A String&quot;, # Start timestamp of the query range.
    &quot;timeUnit&quot;: &quot;A String&quot;, # Query GroupBy time unit.
  },
  &quot;reportDefinitionId&quot;: &quot;A String&quot;, # Asynchronous Report ID.
  &quot;result&quot;: { # Result is available only after the query is completed.
    &quot;expires&quot;: &quot;A String&quot;, # Query result will be unaccessable after this time.
    &quot;self&quot;: &quot;A String&quot;, # Self link of the query results. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result`
  },
  &quot;resultFileSize&quot;: &quot;A String&quot;, # ResultFileSize is available only after the query is completed.
  &quot;resultRows&quot;: &quot;A String&quot;, # ResultRows is available only after the query is completed.
  &quot;self&quot;: &quot;A String&quot;, # Self link of the query. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd`
  &quot;state&quot;: &quot;A String&quot;, # Query state could be &quot;enqueued&quot;, &quot;running&quot;, &quot;completed&quot;, &quot;failed&quot;.
  &quot;updated&quot;: &quot;A String&quot;, # Last updated timestamp for the query.
}</pre>
</div>

<div class="method">
    <code class="details" id="getResult">getResult(name, x__xgafv=None)</code>
  <pre>After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`

Args:
  name: string, Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/queries/{queryId}/result`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can&#x27;t be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
  &quot;contentType&quot;: &quot;A String&quot;, # The HTTP Content-Type header value specifying the content type of the body.
  &quot;data&quot;: &quot;A String&quot;, # The HTTP request/response body as raw binary.
  &quot;extensions&quot;: [ # Application specific response metadata. Must be set in the first response for streaming APIs.
    {
      &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="getResultView">getResultView(name, x__xgafv=None)</code>
  <pre>

Args:
  name: string, Required. Name of the asynchronous query result view to get. Must be of the form `organizations/{org}/queries/{queryId}/resultView`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
  &quot;code&quot;: 42, # Error code when there is a failure.
  &quot;error&quot;: &quot;A String&quot;, # Error message when there is a failure.
  &quot;metadata&quot;: { # Metadata contains information like metrics, dimenstions etc of the AsyncQuery.
    &quot;dimensions&quot;: [ # Dimensions of the AsyncQuery.
      &quot;A String&quot;,
    ],
    &quot;endTimestamp&quot;: &quot;A String&quot;, # End timestamp of the query range.
    &quot;metrics&quot;: [ # Metrics of the AsyncQuery. Example: [&quot;name:message_count,func:sum,alias:sum_message_count&quot;]
      &quot;A String&quot;,
    ],
    &quot;outputFormat&quot;: &quot;A String&quot;, # Output format.
    &quot;startTimestamp&quot;: &quot;A String&quot;, # Start timestamp of the query range.
    &quot;timeUnit&quot;: &quot;A String&quot;, # Query GroupBy time unit.
  },
  &quot;rows&quot;: [ # Rows of query result. Each row is a JSON object. Example: {sum(message_count): 1, developer_app: &quot;(not set)&quot;,…}
    &quot;&quot;,
  ],
  &quot;state&quot;: &quot;A String&quot;, # State of retrieving ResultView.
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, dataset=None, envgroupHostname=None, from=None, inclQueriesWithoutReport=None, status=None, submittedBy=None, to=None, x__xgafv=None)</code>
  <pre>Return a list of Asynchronous Queries at host level.

Args:
  parent: string, Required. The parent resource name. Must be of the form `organizations/{org}`. (required)
  dataset: string, Filter response list by dataset. Example: `api`, `mint`
  envgroupHostname: string, Required. Filter response list by hostname.
  from: string, Filter response list by returning asynchronous queries that created after this date time. Time must be in ISO date-time format like &#x27;2011-12-03T10:15:30Z&#x27;.
  inclQueriesWithoutReport: string, Flag to include asynchronous queries that don&#x27;t have a report denifition.
  status: string, Filter response list by asynchronous query status.
  submittedBy: string, Filter response list by user who submitted queries.
  to: string, Filter response list by returning asynchronous queries that created before this date time. Time must be in ISO date-time format like &#x27;2011-12-03T10:16:30Z&#x27;.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response for ListAsyncQueries.
  &quot;queries&quot;: [ # The asynchronous queries belong to requested resource name.
    {
      &quot;created&quot;: &quot;A String&quot;, # Creation time of the query.
      &quot;envgroupHostname&quot;: &quot;A String&quot;, # Hostname is available only when query is executed at host level.
      &quot;error&quot;: &quot;A String&quot;, # Error is set when query fails.
      &quot;executionTime&quot;: &quot;A String&quot;, # ExecutionTime is available only after the query is completed.
      &quot;name&quot;: &quot;A String&quot;, # Asynchronous Query Name.
      &quot;queryParams&quot;: { # Contains information like metrics, dimenstions etc of the AsyncQuery.
        &quot;dimensions&quot;: [ # Dimensions of the AsyncQuery.
          &quot;A String&quot;,
        ],
        &quot;endTimestamp&quot;: &quot;A String&quot;, # End timestamp of the query range.
        &quot;metrics&quot;: [ # Metrics of the AsyncQuery. Example: [&quot;name:message_count,func:sum,alias:sum_message_count&quot;]
          &quot;A String&quot;,
        ],
        &quot;outputFormat&quot;: &quot;A String&quot;, # Output format.
        &quot;startTimestamp&quot;: &quot;A String&quot;, # Start timestamp of the query range.
        &quot;timeUnit&quot;: &quot;A String&quot;, # Query GroupBy time unit.
      },
      &quot;reportDefinitionId&quot;: &quot;A String&quot;, # Asynchronous Report ID.
      &quot;result&quot;: { # Result is available only after the query is completed.
        &quot;expires&quot;: &quot;A String&quot;, # Query result will be unaccessable after this time.
        &quot;self&quot;: &quot;A String&quot;, # Self link of the query results. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result`
      },
      &quot;resultFileSize&quot;: &quot;A String&quot;, # ResultFileSize is available only after the query is completed.
      &quot;resultRows&quot;: &quot;A String&quot;, # ResultRows is available only after the query is completed.
      &quot;self&quot;: &quot;A String&quot;, # Self link of the query. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd`
      &quot;state&quot;: &quot;A String&quot;, # Query state could be &quot;enqueued&quot;, &quot;running&quot;, &quot;completed&quot;, &quot;failed&quot;.
      &quot;updated&quot;: &quot;A String&quot;, # Last updated timestamp for the query.
    },
  ],
}</pre>
</div>

</body></html>